package model

import "time"

type ShoppingCart struct {
	BaseModel
	User  int32 `grom:"type:int;index"`
	Goods int32 `grom:"type:int;index"`
	Nums  int32 `grom:"type:int"`
	Check bool
}

func (ShoppingCart) TableName() string {
	return "shoppingcart"
}

type OrderInfo struct {
	BaseModel
	User       int32  `gorm:""`
	OrderSn    string `gorm:"type:varchar(30);index"`
	PayType    string `gorm:"type:varchar(20) comment 'alipay,wechat'"`
	Status     string `gorm:"type:varchar(20) comment 'PAYING(待支付)，TRADE_SUCESS(支付成功)'"`
	TradeNo    string `gorm:"type:varchar(100) comment '交易号'"`
	OrderMount float32
	PayTime    time.Time
}

func (OrderInfo) TableName() string {
	return "orderinfo"
}

type OrderGoods struct {
	BaseModel
}
